home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
CC_C
/
0574.ZIP
/
IOCTL.ASM
< prev
next >
Wrap
Assembly Source File
|
1986-08-03
|
442b
|
32 lines
include compiler.inc
ttl IOCTL, 1.03, 08-03-86 clr
;low-level io control
dseg
exterr
cseg
procdef ioctl, <<handl, word>, <flag, word>>
xor ax,ax
moverr ax
mov bx,handl ;handle
mov dx,flag ;flag
or dx,dx
jz doit ;read the bits
inc al ;set the bits
xor dh,dh
doit: mov ah,44h
int 21h
jnb ex
moverr ax ;if error save it
mov dx,-1 ;and return EOF
ex: mov ax,dx
pret
pend ioctl
finish